1. Field of the Invention
This invention relates in general to a relational database management system, and in particular, to memory management on a parallel processing database system.
2. Description of Related Art
The purpose of this invention is to manage cache in a transparent and platform independent manner. Further, the purpose is to manage cache such that only one entity manages the cache. If more than one entity manages the cache (e.g., the operating system or other application and the system of the invention), data stored in the cache may be swapped out to storage resulting in the existence of the data in two independent yet unrelated locations. The problem is to enable such capabilities in a parallel processing relational database management system (RDBMS) or database system (DBS) that can execute on both WINDOWS NT(trademark) and UNIX operating systems for both symmetric multi-processing (SMP) and massively parallel processing (MPP) hardware architectures. The problem for the DBS is to design it in such a manner as to allow the DBS to execute independent of operating system models.
To accommodate the various operating systems, cache and shared memory must be controllable by a single entity within the system and be lockable and coherent among multiple processes. To provide these abilities in the UNIX environment, pages are merely allocated and mapped to a virtual page table that may be directly modified. However, such allocation, mapping, and direct page table modification is not available or possible in the WINDOWS NT operating system.
To overcome the limitations in the prior art described above, and to overcome other limitations that will become apparent upon reading and understanding the present specification, the present invention discloses a parallel processing architecture for a database system (DBS) that manages and allocates secondary memory such as cache, provides data commits and retrieval operations on disk, and provides routines to perform disk I/O (Input/Output) and other memory operations for a file system. The DBS is implemented as a shared nothing, single database image utilizing Parallel Database Extensions (PDEs) comprised of various subsystems for managing memory and providing storage locations for threads.
Embodiments provide for a File SeGment (FSG) subsystem of the PDE that provides services for managing and allocating secondary memory such as cache, providing data commits and retrieval operations on disk, and providing routines to perform disk I/O (Input/Output) and other memory operations for a file system. The FSG subsystem provides for the determination of the amount of cache that may be utilized, locking that portion of cache, using a buddy memory management system to manage the cache, using one or more hash aging queues to determine when to free up cache, permitting preloads of data into the cache, and accepting synchronous or asynchronous I/O requests from a user.